class Person {
    String name="gjw";
    String sex="male";
    void output(){
        System.out.println("This is a person.");
        System.out.println("name:"+name);
        System.out.println("sex:"+sex);

    }
}
class Student extends Person {
    void output1(){
        String speciality=("Computer major");
        int n=1;
        System.out.println("This is a student.");   System.out.println("speciality:"+speciality);
        System.out.println("class:"+n);
    }
}
class Postgraduate extends Person {
    void output2(){
        String college =("Huazhong University of Science and Technology (HUST)");
        String name1="tjf";
        System.out.println("This is a postgraduate.");
        System.out.println("college:"+college);
        System.out.println("name of mentor:"+name1);

    }
}

public class Demo1 {
    public static void main(String[] args) {
        Student s1 = new Student ();
        Postgraduate s2 = new Postgraduate();
        s1.output();
        s1.output1();
        s2.output2();
    }
}
